import java.io.Serializable;
import java.util.Date;

public class Event implements Serializable {
    private String id;
    private String name;
    private String rules;
    private Date startTime;
    private Date endTime;
    private String location;

    public Event(String id, String name, String rules, Date startTime, Date endTime, String location) {
        this.id = id;
        this.name = name;
        this.rules = rules;
        this.startTime = startTime;
        this.endTime = endTime;
        this.location = location;
    }

    // getters 和 setters
    public String getId() { return id; }
    public String getName() { return name; }
    public String getRules() { return rules; }
    public Date getStartTime() { return startTime; }
    public Date getEndTime() { return endTime; }
    public String getLocation() { return location; }

    public void setName(String name) { this.name = name; }
    public void setRules(String rules) { this.rules = rules; }
    public void setStartTime(Date startTime) { this.startTime = startTime; }
    public void setEndTime(Date endTime) { this.endTime = endTime; }
    public void setLocation(String location) { this.location = location; }

    @Override
    public String toString() {
        return "项目ID：" + id + ", 名称：" + name + ", 规则：" + rules + ", 时间：" + startTime + " - " + endTime + ", 地点：" + location;
    }
}





